package com.xcb.spring.demo.service;


import com.xcb.spring.beans.Autowired;
import com.xcb.spring.beans.Component;

import java.util.*;

@Component("orderService")
public class OrderServiceImpl implements OrderService {

    @Autowired
    private UserService userService;

    @Override
    public List<Map<String,Object>> getOrders() {
        Map<String,Object> m1 = new HashMap<String, Object>(10);
        m1.put("orderNum", UUID.randomUUID().toString().replace("-",""));
        m1.put("productName","2021款Mac book pro M1");
        m1.put("price",15000);

        Map<String,Object> m2 = new HashMap<String, Object>(10);
        m2.put("orderNum", UUID.randomUUID().toString().replace("-",""));
        m2.put("productName","啊哈啊，暂时想不到名字了");
        m2.put("price",566);
        return Arrays.asList(m1,m2);
    }
}
